home *** CD-ROM | disk | FTP | other *** search
- /* ======================================= *
- file: BitMapperRsrc.h
- version: 2
- date: 11.17.89
- * --------------------------------------- *
- Header file for C and Rez for the
- BitMapper SuperPaint plug-in tool.
- Contains symbolic constants, data type
- and resource type definitions that are
- common to both the C and Rez components
- of the project. Utilizes the Rez
- compiler symbol, “REZ”, to conditionally
- include/exclude definition lines as
- necessary.
- * --------------------------------------- *
- Copyright © 1989, Michael Ogawa and
- MacTutor — All Rights Reserved.
- * ======================================= */
-
- #ifndef _H_BitMapperRsrc
- #define _H_BitMapperRsrc
-
- #ifdef REZ
- # ifndef bold
- # include "Types.r"
- # include "SysTypes.r"
- # endif bold
- #endif REZ
-
-
- /* constants ============================= */
-
- #define kOrigBaseID 16000
- /* All resources of plug-in tools should be
- numbered consecutively from a base resource
- ID. This is the ID# we are using as our base
- ID. */
- /* m_o 09.13.89 */
-
-
- #define kType_BitMap 'BTMP'
- /* Resource type of our custom bitmap and
- image resource that we create with
- BitMapper. */
- /* m_o 09.13.89 */
-
-
- #define kALRT_Err 0 /* + baseID */
- #define kDITL_Err kALRT_Err /* + baseID */
- #define kactb_Err kALRT_Err /* + baseID */
- /* ID offsets for the error alert
- resources, based off of the base resource ID.
- The resources are Rez compiled with these
- resource IDs plus kOrigBaseID. They are
- calculated at runtime based on the value in
- the toolID field of the menu command data
- record that is passed in to our tool. */
- /* m_o 09.17.89 */
-
-
- #define kMENU_BitMapper 200
- #ifndef REZ
- enum {
- kMITEM_BTMP = 1, /* BTMP */
- kMITEM_BTMN /* BTM# */
- };
- #endif REZ
- /* Menu ID and item numbers for our
- sub-menu. Menu IDs in the range of 0-235
- are reserved for applications to use for
- sub-menus, SuperPaint reserves the sub-range
- of 200-235 for plug-ins. */
- /* m_o 11.13.89 */
-
-
- /* data types ============================ */
-
- #ifndef REZ
- typedef struct {
- BitMap map;
- short image[];
- } TBTMP, *TBTMPPeek, **TBTMPPkHndl;
- typedef BitMap *TBTMPPtr, **TBTMPHndl;
- #else
- type kType_BitMap {
- unsigned longint = 0; /* map.baseAddr */
- integer; /* map.rowBytes */
- rect; /* map.bounds */
- hex string; /* image */
- };
- #endif REZ
- /* Data structure for our custom bitmap and
- image resource type. */
- /* mps 06.22.89/m_o 06.25.89 */
-
-
- #ifndef REZ
- typedef struct {
- short szEntry;
- TBTMP theBTMP;
- } TBTMNEntry, *TBTMNEntryPtr;
- #endif REZ
- /* An entry in the 'BTM#' resource data
- type consists of a field containing the size
- of the entry in bytes, followed by the 'BTMP'
- resource data.
- Note that you may want to change the
- szEntry field to type Size to deal with very
- large bit images. */
- /* mps 06.22.89/m_o 11.17.89 */
-
-
- #ifndef REZ
- typedef struct {
- short count;
- TBTMNEntry theBTMNEntries[];
- } *TBMPN, *TBTMNPtr, **TBTMNHndl;
- #endif REZ
- /* The 'BTM#' resource data type consists
- of a field indicating the number of entries
- in the resource, followed by the entries. */
- /* mps 06.22.89/m_o 11.13.89 */
-
-
- #endif _H_BitMapperRsrc
-